/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.scrumpmt.ejb;

import org.scrumpmt.ejb.AbstractFacade;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import org.scrumpmt.domain.TipoTarea;

/**
 *
 * @author aljiru
 */
@Stateless
public class TipoTareaFacade extends AbstractFacade<TipoTarea> {
    @PersistenceContext(unitName = "ScrumPMT-ejbPU")
    private EntityManager em;

    @Override
    protected EntityManager getEntityManager() {
        return em;
    }

    public TipoTareaFacade() {
        super(TipoTarea.class);
    }
    
    public TipoTarea findByTipo(String estado){
        TipoTarea tipo = (TipoTarea) em.createNamedQuery("TipoTarea.findByDes").setParameter("des", estado).
                getSingleResult();
        return tipo;
    
    }
    
}
